package net.esj.basic.core.engine.tools.exec;

import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.LineNumberReader;

import net.esj.basic.core.engine.tools.exec.inst.TracertExec;

public class test {

	
	/**
	 * javac -d E:\aaa -classpath E:\program\javaws\melon_0.3\sr
	c\core\main\libs E:\program\javaws\melon_0.3\src\core\main\test\net\esj\test\poj
	o\Boo.java
	 * @param args
	 */
	public static void main(String[] args) {
		//Exec exec = new JavacExec();
		Exec exec = new TracertExec();
		try {
			InputStream is = exec.execute(new String[]{"-d E:\\aaa -classpath E:\\program\\javaws\\melon_0.3\\src\\core\\main\\libs","E:\\program\\javaws\\melon_0.3\\src\\core\\main\\test\\net\\esj\\test\\pojo\\Boo.java"});
			 InputStreamReader r = new InputStreamReader(is);
			 LineNumberReader returnData = new LineNumberReader(r);  
			 String returnMsg="";
			 String line = "";  
			 while ((line = returnData.readLine()) != null) {
				 //line = new String(line.getBytes("utf-8"),"gb2312");
				 System.out.println(line);  
				 returnMsg += line;  
			 }
		} catch (IOException e) {
			e.printStackTrace();
		}
		
	}

}
